package proto

import (
	"regexp"
	D "websocket_apn/define"
	"websocket_apn/log"
)

/*

灵兽召唤-刷新结果
[DEBUG] [2024/04/25 00:42:42] [PRJ/websocket_apn/main_test.go]:[  192]:   MessageID: ↓↓↓↓↓ Server.2100
[DEBUG] [2024/04/25 00:42:42] [PRJ/websocket_apn/main_test.go]:[  194]:   game cmd[742]-unkown - id:3109673861602
[DEBUG] [2024/04/25 00:42:42] [PRJ/websocket_apn/main_test.go]:[  195]:   PayloadBytes: 71 AB 00 00 00 30 00 00 02 E6 00 00 02D4 07 01 81 E2 08 00 12 06 08 9D E3 06 10 00 12 06 08 99 E3 06 10 00 12 06 08 9D E3 06 10 00 18 0A 20 04

*/
func GetPetNameByID(ID [3]byte) string {
	str := ""
	switch ID[1] {
	case 0xE3:
		str += "常见-"
		if ID[0] == 0x9F {
			str += "0x9F"
		} else if ID[0] == 0x9E {
			str += "0x9E"
		} else if ID[0] == 0x9D {
			str += "硕鼠"
		} else if ID[0] == 0x9C {
			str += "土精"
		} else if ID[0] == 0x9B {
			str += "山猿"
		} else if ID[0] == 0x9A {
			str += "云雀"
		} else if ID[0] == 0x99 {
			str += "灵狐"
		} else {
			str += "未知"
		}
		break
	case 0xEB:
		str += "普通-"
		if ID[0] == 0x86 {
			str += "0x86"
		} else if ID[0] == 0x85 {
			str += "蜂翁"
		} else if ID[0] == 0x84 {
			str += "窫窳"
		} else if ID[0] == 0x83 {
			str += "雨工"
		} else if ID[0] == 0x82 {
			str += "封烯"
		} else if ID[0] == 0x81 {
			str += "玉兔"
		} else {
			str += "未知"
		}
		break
	case 0xF2:
		str += "卓越-"
		if ID[0] == 0xF0 {
			str += "祸斗"
		} else if ID[0] == 0xEF {
			str += "吉利"
		} else if ID[0] == 0xEE {
			str += "狌狌"
		} else if ID[0] == 0xED {
			str += "鹿蜀"
		} else if ID[0] == 0xEC {
			str += "英招"
		} else if ID[0] == 0xEB {
			str += "帝江"
		} else if ID[0] == 0xEA {
			str += "天马"
		} else if ID[0] == 0xE9 {
			str += "白泽"
		} else {
			str += "未知"
		}
		break
	case 0xFA:
		str += "传说-"
		if ID[0] == 0xD7 {
			str += "鸾鸟"
		} else if ID[0] == 0xD6 {
			str += "计蒙"
		} else if ID[0] == 0xD5 {
			str += "狻猊"
		} else if ID[0] == 0xD4 {
			str += "九尾狐"
		} else if ID[0] == 0xD3 {
			str += "无支祈"
		} else if ID[0] == 0xD2 {
			str += "年"
		} else if ID[0] == 0xD1 {
			str += "应龙"
		} else {
			str += "未知"
		}
		break
	case 0x82:
		str += "神话-"
		//
		if ID[0] == 0xBE {
			str += "0xBE"
		} else if ID[0] == 0xBD {
			str += "麒麟"
		} else if ID[0] == 0xBC {
			str += "玄武"
		} else if ID[0] == 0xBB {
			str += "朱雀"
		} else if ID[0] == 0xBA {
			str += "白虎"
		} else if ID[0] == 0xB9 {
			str += "青龙"
		} else {
			str += "未知"
		}
		break
	default:
		str += "未知"
		break
	}
	return str
}

/*
2024/10/07 15:14:57.093729 main_test.go:195: [0;32m[DEBUG][0m↓↓↓↓↓ S_PET_DATA_SYNC_RSP - len:2277
2024/10/07 15:14:57.096847 main_test.go:200: [0;32m[DEBUG][0m[PayloadBytes:  71 AB 00 00 08 E5 00 00 02 E4 00 00 02 D4 07 01 81 E2 0A D0 11 0A 06 08 9A E3 06 10 00 0A 06 08 9D E3 06 10 00 0A 06 08 F0 F2 06 10 00 10 2A 1A 28 08 C0 02 10 9C E3 06 18 01 20 00 2A 08 08 A4 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 C1 02 10 9A E3 06 18 01 20 00 2A 08 08 9C BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 C2 02 10 9C E3 06 18 01 20 00 2A 08 08 93 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 C3 02 10 9C E3 06 18 01 20 00 2A 08 08 A0 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 C4 02 10 9B E3 06 18 01 20 00 2A 08 08 B6 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 4B 08 C9 02 10 BC 82 07 18 01 20 13 2A 08 08 A9 BF 05 10 08 18 00 2A 08 08 C6 BF 05 10 04 18 00 2A 08 08 98 BF 05 10 08 18 00 2A 08 08 A1 BF 05 10 03 18 00 30 BE 01 50 00 58 00 60 01 68 01 70 00 78 00 80 01 01 90 01 00 98 01 00 1A 28 08 CB 02 10 9D E3 06 18 01 20 00 2A 08 08 D0 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 CC 02 10 9B E3 06 18 01 20 00 2A 08 08 9D BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 CD 02 10 9C E3 06 18 01 20 00 2A 08 08 CE BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 46 08 8E 02 10 BB 82 07 18 01 20 00 2A 08 08 9C BF 05 10 01 18 00 2A 08 08 9D BF 05 10 01 18 00 2A 08 08 CB BF 05 10 01 18 00 2A 08 08 AF BF 05 10 01 18 00 30 00 50 00 60 00 68 01 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 CF 02 10 99 E3 06 18 01 20 00 2A 08 08 B1 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 D0 02 10 99 E3 06 18 01 20 00 2A 08 08 9E BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 D1 02 10 99 E3 06 18 01 20 00 2A 08 08 A1 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 D2 02 10 99 E3 06 18 01 20 00 2A 08 08 CC BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 D3 02 10 9A E3 06 18 01 20 00 2A 08 08 C2 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 D4 02 10 99 E3 06 18 01 20 00 2A 08 08 A1 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 46 08 D7 02 10 BC 82 07 18 01 20 00 2A 08 08 A9 BF 05 10 01 18 00 2A 08 08 D0 BF 05 10 01 18 00 2A 08 08 A5 BF 05 10 01 18 00 2A 08 08 B9 BF 05 10 01 18 00 30 00 50 00 60 00 68 01 70 00 80 01 01 90 01 00 98 01 00 1A 46 08 D9 02 10 BC 82 07 18 01 20 00 2A 08 08 97 BF 05 10 01 18 00 2A 08 08 A9 BF 05 10 01 18 00 2A 08 08 B1 BF 05 10 01 18 00 2A 08 08 B0 BF 05 10 01 18 00 30 00 50 00 60 00 68 01 70 00 80 01 01 90 01 00 98 01 00 1A 46 08 E0 02 10 D1 FA 06 18 01 20 11 2A 08 08 B4 BF 05 10 04 18 00 2A 08 08 A0 BF 05 10 06 18 00 2A 08 08 AB BF 05 10 05 18 00 2A 08 08 B7 BF 05 10 05 18 00 30 00 50 00 60 00 68 01 70 00 80 01 01 90 01 00 98 01 00 1A 54 08 A5 01 10 B9 82 07 18 B9 01 20 28 2A 08 08 C9 BF 05 10 0A 18 00 2A 08 08 AB BF 05 10 0A 18 00 2A 08 08 9F BF 05 10 0A 18 00 2A 08 08 BD BF 05 10 0A 18 00 30 F6 01 50 02 58 03 60 00 68 01 70 00 78 00 80 01 12 88 01 EA 07 88 01 D5 0F 90 01 00 98 01 00 1A 32 08 E5 02 10 F0 F2 06 18 01 20 00 2A 08 08 94 BF 05 10 01 18 00 2A 08 08 BF BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 32 08 E6 02 10 EA F2 06 18 01 20 00 2A 08 08 B1 BF 05 10 01 18 00 2A 08 08 A0 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 32 08 E7 02 10 EE F2 06 18 01 20 00 2A 08 08 A7 BF 05 10 01 18 00 2A 08 08 C8 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 E8 02 10 81 EB 06 18 01 20 00 2A 08 08 9F BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 A9 02 10 9C E3 06 18 06 20 00 2A 08 08 A0 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 E9 02 10 82 EB 06 18 01 20 00 2A 08 08 A0 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 EA 02 10 99 E3 06 18 01 20 00 2A 08 08 C5 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 EB 02 10 9B E3 06 18 01 20 00 2A 08 08 9F BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 EC 02 10 9A E3 06 18 01 20 00 2A 08 08 9E BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 ED 02 10 9A E3 06 18 01 20 00 2A 08 08 93 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 EE 02 10 9A E3 06 18 01 20 00 2A 08 08 B7 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 EF 02 10 9D E3 06 18 01 20 00 2A 08 08 AE BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 B0 02 10 9C E3 06 18 01 20 00 2A 08 08 A8 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 28 08 B1 02 10 9A E3 06 18 01 20 00 2A 08 08 91 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00 1A 60 08 F6 01 10 D1 FA 06 18 C8 01 20 28 2A 08 08 B0 BF 05 10 0A 18 00 2A 08 08 AB BF 05 10 0A 18 00 2A 08 08 A6 BF 05 10 0A 18 00 2A 08 08 9F BF 05 10 0A 18 00 30 A5 01 50 03 58 02 60 00 68 01 70 00 78 00 80 01 23 88 01 BA 17 88 01 D6 0F 88 01 C8 17 88 01 DB 0F 88 01 DD 0F 90 01 00 98 01 00 1A 4B 08 BE 01 10 D7 FA 06 18 03 20 28 2A 08 08 93 BF 05 10 0A 18 00 2A 08 08 9D BF 05 10 0A 18 00 2A 08 08 A9 BF 05 10 0A 18 00 2A 08 08 99 BF 05 10 0A 18 00 30 C9 02 50 00 58 00 60 00 68 01 70 00 78 00 80 01 01 90 01 00 98 01 01 20 F6 01 28 00 30 99 E3 06 30 84 EB 06 30 81 EB 06 30 D1 FA 06 30 ED F2 06 30 9A E3 06 30 F0 F2 06 30 9C E3 06 30 BB 82 07 30 85 EB 06 30 9D E3 06 30 BD 82 07 30 83 EB 06 30 BA 82 07 30 D6 FA 06 30 9B E3 06 30 EF F2 06 30 EB F2 06 30 82 EB 06 30 D7 FA 06 30 D2 FA 06 30 D3 FA 06 30 E9 F2 06 30 D5 FA 06 30 EE F2 06 30 EC F2 06 30 B9 82 07 30 EA F2 06 30 D4 FA 06 30 BC 82 07 38 00 40 08 48 BC 82 07 50 04 58 00 6A 80 02 0A 07 08 C5 17 10 00 18 01 0A 07 08 C6 17 10 00 18 01 0A 08 08 C8 17 10 F6 01 18 03 0A 07 08 D4 0F 10 00 18 01 0A 08 08 D5 0F 10 A5 01 18 01 0A 08 08 D6 0F 10 F6 01 18 01 0A 07 08 D8 0F 10 00 18 01 0A 08 08 DB 0F 10 F6 01 18 01 0A 08 08 DD 0F 10 F6 01 18 01 0A 07 08 DF 0F 10 00 18 01 0A 07 08 E9 07 10 00 18 05 0A 08 08 EA 07 10 A5 01 18 03 0A 07 08 EB 07 10 00 18 01 0A 07 08 EC 07 10 00 18 01 0A 07 08 EE 07 10 00 18 01 0A 07 08 EF 07 10 00 18 01 0A 07 08 F0 07 10 00 18 01 0A 07 08 F2 07 10 00 18 01 0A 07 08 F3 07 10 00 18 01 0A 07 08 F4 07 10 00 18 01 0A 07 08 F5 07 10 00 18 03 0A 07 08 F6 07 10 00 18 01 0A 07 08 F7 07 10 00 18 05 0A 07 08 B9 17 10 00 18 01 0A 08 08 BA 17 10 F6 01 18 01 0A 07 08 BC 17 10 00 18 01 12 05 08 9E 75 10 01 18 00 20 3A 28 04 30 00 78 00]

71 AB 00 00 08 E5 00 00 02 E4 00 00 02 D4 07 01 81 E2
                 //灵兽召唤的3只          2                        3
0A D0 11 0A 06 08 9A E3 06 10 00 0A 06 08 9D E3 06 10 00 0A 06 08 F0 F2 06 10 00 10 2A
          序号     灵兽       等级  星级
1A 28 08 C0 02 10 9C E3 06 18 01 20 00 2A 08 08 A4 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 C1 02 10 9A E3 06 18 01 20 00 2A 08 08 9C BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 C2 02 10 9C E3 06 18 01 20 00 2A 08 08 93 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 C3 02 10 9C E3 06 18 01 20 00 2A 08 08 A0 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 C4 02 10 9B E3 06 18 01 20 00 2A 08 08 B6 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 4B 08 C9 02 10 BC 82 07 18 01 20 13 2A 08 08 A9 BF 05 10 08 18 00 2A 08 08 C6 BF 05 10 04 18 00 2A 08 08 98 BF 05 10 08 18 00 2A 08 08 A1 BF 05 10 03 18 00 30 BE 01 50 00 58 00 60 01 68 01 70 00 78 00 80 01 01 90 01 00 98 01 00
1A 28 08 CB 02 10 9D E3 06 18 01 20 00 2A 08 08 D0 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 CC 02 10 9B E3 06 18 01 20 00 2A 08 08 9D BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 CD 02 10 9C E3 06 18 01 20 00 2A 08 08 CE BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 46 08 8E 02 10 BB 82 07 18 01 20 00 2A 08 08 9C BF 05 10 01 18 00 2A 08 08 9D BF 05 10 01 18 00 2A 08 08 CB BF 05 10 01 18 00 2A 08 08 AF BF 05 10 01 18 00 30 00 50 00 60 00 68 01 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 CF 02 10 99 E3 06 18 01 20 00 2A 08 08 B1 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 D0 02 10 99 E3 06 18 01 20 00 2A 08 08 9E BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 D1 02 10 99 E3 06 18 01 20 00 2A 08 08 A1 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 D2 02 10 99 E3 06 18 01 20 00 2A 08 08 CC BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 D3 02 10 9A E3 06 18 01 20 00 2A 08 08 C2 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 D4 02 10 99 E3 06 18 01 20 00 2A 08 08 A1 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 46 08 D7 02 10 BC 82 07 18 01 20 00 2A 08 08 A9 BF 05 10 01 18 00 2A 08 08 D0 BF 05 10 01 18 00 2A 08 08 A5 BF 05 10 01 18 00 2A 08 08 B9 BF 05 10 01 18 00 30 00 50 00 60 00 68 01 70 00 80 01 01 90 01 00 98 01 00
1A 46 08 D9 02 10 BC 82 07 18 01 20 00 2A 08 08 97 BF 05 10 01 18 00 2A 08 08 A9 BF 05 10 01 18 00 2A 08 08 B1 BF 05 10 01 18 00 2A 08 08 B0 BF 05 10 01 18 00 30 00 50 00 60 00 68 01 70 00 80 01 01 90 01 00 98 01 00
1A 46 08 E0 02 10 D1 FA 06 18 01 20 11 2A 08 08 B4 BF 05 10 04 18 00 2A 08 08 A0 BF 05 10 06 18 00 2A 08 08 AB BF 05 10 05 18 00 2A 08 08 B7 BF 05 10 05 18 00 30 00 50 00 60 00 68 01 70 00 80 01 01 90 01 00 98 01 00
1A 54 08 A5 01 10 B9 82 07 18 B9 01 20 28 2A 08 08 C9 BF 05 10 0A 18 00 2A 08 08 AB BF 05 10 0A 18 00 2A 08 08 9F BF 05 10 0A 18 00 2A 08 08 BD BF 05 10 0A 18 00 30 F6 01 50 02 58 03 60 00 68 01 70 00 78 00 80 01 12 88 01 EA 07 88 01 D5 0F 90 01 00 98 01 00
1A 32 08 E5 02 10 F0 F2 06 18 01 20 00 2A 08 08 94 BF 05 10 01 18 00 2A 08 08 BF BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 32 08 E6 02 10 EA F2 06 18 01 20 00 2A 08 08 B1 BF 05 10 01 18 00 2A 08 08 A0 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 32 08 E7 02 10 EE F2 06 18 01 20 00 2A 08 08 A7 BF 05 10 01 18 00 2A 08 08 C8 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 E8 02 10 81 EB 06 18 01 20 00 2A 08 08 9F BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 A9 02 10 9C E3 06 18 06 20 00 2A 08 08 A0 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 E9 02 10 82 EB 06 18 01 20 00 2A 08 08 A0 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 EA 02 10 99 E3 06 18 01 20 00 2A 08 08 C5 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 EB 02 10 9B E3 06 18 01 20 00 2A 08 08 9F BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 EC 02 10 9A E3 06 18 01 20 00 2A 08 08 9E BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 ED 02 10 9A E3 06 18 01 20 00 2A 08 08 93 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 EE 02 10 9A E3 06 18 01 20 00 2A 08 08 B7 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 EF 02 10 9D E3 06 18 01 20 00 2A 08 08 AE BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 B0 02 10 9C E3 06 18 01 20 00 2A 08 08 A8 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 28 08 B1 02 10 9A E3 06 18 01 20 00 2A 08 08 91 BF 05 10 01 18 00 30 00 50 00 60 00 68 00 70 00 80 01 01 90 01 00 98 01 00
1A 60 08 F6 01 10 D1 FA 06 18 C8 01 20 28 2A 08 08 B0 BF 05 10 0A 18 00 2A 08 08 AB BF 05 10 0A 18 00 2A 08 08 A6 BF 05 10 0A 18 00 2A 08 08 9F BF 05 10 0A 18 00 30 A5 01 50 03 58 02 60 00 68 01 70 00 78 00 80 01 23 88 01 BA 17 88 01 D6 0F 88 01 C8 17 88 01 DB 0F 88 01 DD 0F 90 01 00 98 01 00
1A 4B 08 BE 01 10 D7 FA 06 18 03 20 28 2A 08 08 93 BF 05 10 0A 18 00 2A 08 08 9D BF 05 10 0A 18 00 2A 08 08 A9 BF 05 10 0A 18 00 2A 08 08 99 BF 05 10 0A 18 00 30 C9 02 50 00 58 00 60 00 68 01 70 00 78 00 80 01 01 90 01 00 98 01 01

20 F6 01 28 00 30 99 E3 06 30 84 EB 06 30 81 EB 06 30 D1 FA 06 30 ED F2 06 30 9A E3 06 30 F0 F2 06 30 9C E3 06 30 BB 82 07 30 85 EB 06 30 9D E3 06 30 BD 82 07 30 83 EB 06 30 BA 82 07 30 D6 FA 06 30 9B E3 06 30 EF F2 06 30 EB F2 06 30 82 EB 06 30 D7 FA 06 30 D2 FA 06 30 D3 FA 06 30 E9 F2 06 30 D5 FA 06 30 EE F2 06 30 EC F2 06 30 B9 82 07 30 EA F2 06 30 D4 FA 06 30 BC 82 07 38 00 40 08 48 BC 82 07 50 04 58 00 6A 80 02 0A 07 08 C5 17 10 00 18 01 0A 07 08 C6 17 10 00 18 01 0A 08 08 C8 17 10 F6 01 18 03 0A 07 08 D4 0F 10 00 18 01 0A 08 08 D5 0F 10 A5 01 18 01 0A 08 08 D6 0F 10 F6 01 18 01 0A 07 08 D8 0F 10 00 18 01 0A 08 08 DB 0F 10 F6 01 18 01 0A 08 08 DD 0F 10 F6 01 18 01 0A 07 08 DF 0F 10 00 18 01 0A 07 08 E9 07 10 00 18 05 0A 08 08 EA 07 10 A5 01 18 03 0A 07 08 EB 07 10 00 18 01 0A 07 08 EC 07 10 00 18 01 0A 07 08 EE 07 10 00 18 01 0A 07 08 EF 07 10 00 18 01 0A 07 08 F0 07 10 00 18 01 0A 07 08 F2 07 10 00 18 01 0A 07 08 F3 07 10 00 18 01 0A 07 08 F4 07 10 00 18 01 0A 07 08 F5 07 10 00 18 03 0A 07 08 F6 07 10 00 18 01 0A 07 08 F7 07 10 00 18 05 0A 07 08 B9 17 10 00 18 01 0A 08 08 BA 17 10 F6 01 18 01 0A 07 08 BC 17 10 00 18 01 12 05 08 9E 75 10 01 18 00 20 3A 28 04 30 00 78 00]

*/
func ParaAllPetInfo(dataBytes []byte) D.AllPetInfo {
	allInfo := D.AllPetInfo{}
	if len(dataBytes) < 5 {
		return allInfo
	}
	data := BytesToHexStr(dataBytes)

	// 定义正则表达式
	//0A 06 08 81 EB 06 10 00
	//12 06 08 BE 82 07 10 00
	re := regexp.MustCompile(`(12|0A)0608[0-9A-F]{6}100[01]`)
	res := re.FindAllStringIndex(data, -1)
	if len(res) == 0 {
		log.Errorf("解析数据失败-%s", data)
	}
	// 打印结果
	for num, idx := range res {
		if num >= 3 {
			break
		}
		if idx[0]%2 != 0 || idx[1]%2 != 0 {
			continue
		}
		startIdx := int(idx[0] / 2)
		if dataBytes[startIdx] == 0x12 {
			allInfo.IsByLogin = false
		} else if dataBytes[startIdx] == 0x0A {
			allInfo.IsByLogin = true
		}
		allInfo.PetInfo[num].ID[0] = dataBytes[startIdx+3]
		allInfo.PetInfo[num].ID[1] = dataBytes[startIdx+4]
		allInfo.PetInfo[num].ID[2] = dataBytes[startIdx+5]
		allInfo.PetInfo[num].Name = GetPetNameByID(allInfo.PetInfo[num].ID)
		if dataBytes[startIdx+7] == 0 {
			allInfo.PetInfo[num].HasBuy = false
		} else {
			allInfo.PetInfo[num].HasBuy = true
		}
	}
	log.Infof("灵兽信息: %02X%02X(%s) %02X%02X(%s) %02X%02X(%s)", allInfo.PetInfo[0].ID[0], allInfo.PetInfo[0].ID[1], allInfo.PetInfo[0].Name,
		allInfo.PetInfo[1].ID[0], allInfo.PetInfo[1].ID[1], allInfo.PetInfo[1].Name,
		allInfo.PetInfo[2].ID[0], allInfo.PetInfo[2].ID[1], allInfo.PetInfo[2].Name)
	//背包中的灵兽                                   // 1 序号                   2 ID                    3 等级                  4 星级
	re1 := regexp.MustCompile(`1A[0-9A-F]{2}08((?:[0-9A-F]{2}){1,4})10([0-9A-F]{6})18((?:[0-9A-F]{2}){1,2})20([0-9A-F]{2})2A`)
	res1 := re1.FindAllStringSubmatch(data, -1)
	if len(res1) == 0 && len(res) == 0 {
		log.Errorf("解析数据失败-%s", data)
	}
	// 打印结果
	for _, regRes := range res1 {
		info := D.PackPetInfo{
			Idx:   regRes[1],                           //灵兽ID
			Level: int(ParaIntDataByHexStr(regRes[3])), //等级
			Grade: int(ParaIntDataByHexStr(regRes[4])), //星级
		}
		bytes, err := HexStrToBytes(regRes[2])
		if err == nil {
			info.ID[0] = bytes[0]               //灵兽类型ID
			info.ID[1] = bytes[1]               //灵兽类型ID
			info.ID[2] = bytes[2]               //灵兽类型ID
			info.Name = GetPetNameByID(info.ID) //灵兽名称
		}
		allInfo.PackPet = append(allInfo.PackPet, info)
		//log.Infof("%+v", info)
	}
	return allInfo
}
